.class public abstract Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;
.super Ljava/lang/Object;
.source "TypeSelector.java"


# instance fields
.field private ab_point:Landroid/widget/LinearLayout;

.field protected current:I


# direct methods
.method public constructor <init>(Landroid/widget/LinearLayout;)V
    .locals 1

    .line 21
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    .line 16
    iput v0, p0, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->current:I

    .line 22
    iput-object p1, p0, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->ab_point:Landroid/widget/LinearLayout;

    return-void
.end method


# virtual methods
.method public change()V
    .locals 3

    .line 28
    iget v0, p0, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->current:I

    add-int/lit8 v0, v0, 0x1

    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->getCount()I

    move-result v1

    if-ge v0, v1, :cond_0

    .line 29
    iget v0, p0, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->current:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->current:I

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    .line 31
    iput v0, p0, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->current:I

    .line 33
    :goto_0
    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->render()V

    .line 34
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->getTypes()[I

    move-result-object v1

    iget v2, p0, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->current:I

    aget v1, v1, v2

    invoke-static {v0, v1}, Llt/noframe/gpsfarmguide/utils/LastPickPrefrences;->setNavigationType(Landroid/content/Context;I)V

    return-void
.end method

.method public abstract getCount()I
.end method

.method public abstract getTypes()[I
.end method

.method public render()V
    .locals 3

    .line 40
    iget-object v0, p0, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->ab_point:Landroid/widget/LinearLayout;

    const v1, 0x7f0901be

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->getTypes()[I

    move-result-object v1

    iget v2, p0, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->current:I

    aget v1, v1, v2

    invoke-static {v1}, Llt/noframe/gpsfarmguide/widgets/bottom_start/NaviType;->getNameByType(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-void
.end method

.method public setCurrentType(I)V
    .locals 3

    .line 62
    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->getTypes()[I

    move-result-object v0

    const/4 v1, 0x0

    .line 63
    :goto_0
    array-length v2, v0

    if-ge v1, v2, :cond_1

    .line 65
    aget v2, v0, v1

    if-ne p1, v2, :cond_0

    .line 66
    iput v1, p0, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->current:I

    .line 67
    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->render()V

    .line 68
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p1

    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->getTypes()[I

    move-result-object v0

    iget v1, p0, Llt/noframe/gpsfarmguide/widgets/bottom_start/TypeSelector;->current:I

    aget v0, v0, v1

    invoke-static {p1, v0}, Llt/noframe/gpsfarmguide/utils/LastPickPrefrences;->setNavigationType(Landroid/content/Context;I)V

    return-void

    :cond_0
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_1
    return-void
.end method
